home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / internal / m68k / new / semaphoreglue.s < prev    next >
Encoding:
Text File  |  1996-07-16  |  1.1 KB  |  59 lines

  1.     /*    The following functions are guaranteed to preserve    */
  2.     /*    all registers. But I don't want to write them completely    */
  3.     /*    in assembly - C is generally more readable.        */
  4.     /*    So I use those stubs to preserve the registers.        */
  5.  
  6.     .text
  7.     .align    16
  8.     .globl    Exec__ObtainSemaphore
  9.     .type    Exec__Obtainsemaphore,@function
  10. Exec__ObtainSemaphore:
  11.     pushl    %eax
  12.     pushl    %ecx
  13.     pushl    %edx
  14.     movl    20(%esp),%eax
  15.     pushl    %eax
  16.     movl    20(%esp),%eax
  17.     pushl    %eax
  18.     call    Exec_ObtainSemaphore
  19.     addl    $8,%esp
  20.     popl    %edx
  21.     popl    %ecx
  22.     popl    %eax
  23.     ret
  24.  
  25.     .globl    Exec__ReleaseSemaphore
  26.     .type    Exec__ReleaseSemaphore,@function
  27. Exec__ReleaseSemaphore:
  28.     pushl    %eax
  29.     pushl    %ecx
  30.     pushl    %edx
  31.     movl    20(%esp),%eax
  32.     pushl    %eax
  33.     movl    20(%esp),%eax
  34.     pushl    %eax
  35.     call    Exec_ReleaseSemaphore
  36.     addl    $8,%esp
  37.     popl    %edx
  38.     popl    %ecx
  39.     popl    %eax
  40.     ret
  41.  
  42.     .globl    Exec__ObtainSemaphoreShared
  43.     .type    Exec__ObtainSemaphoreShared,@function
  44. Exec__ObtainSemaphoreShared:
  45.     pushl    %eax
  46.     pushl    %ecx
  47.     pushl    %edx
  48.     movl    20(%esp),%eax
  49.     pushl    %eax
  50.     movl    20(%esp),%eax
  51.     pushl    %eax
  52.     call    Exec_ObtainSemaphoreShared
  53.     addl    $8,%esp
  54.     popl    %edx
  55.     popl    %ecx
  56.     popl    %eax
  57.     ret
  58.  
  59.